﻿using Core.DataAccess.Model.Project.Comment;
using Core.Framework.Model.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Core.DataAccess.Model.Project.Information
{
    /// <summary>
    /// 信息主表
    /// </summary>
    public partial class InformationList
    {
        public int Id { get; set; }

        [Required]
        public int UserKey { get; set; }

        [StringLength(21)]
        public string ProjectToken { get; set; }

        [Required]
        public int TypeKey { get; set; }

        [MaxLength(50)]
        public string Title { get; set; }
        public string Content { get; set; }
        [MaxLength(2000)]
        public string Related { get; set; }
        [MaxLength(2000)]
        public string Extend { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public int sort { get; set; }

        public DateTime RegTime { get; set; } = DateTime.Now;
        public DateTime? EndTime { get; set; }

        [NotMapped]
        public List<InformationAttribute> Attributes { get; set; }

        [NotMapped]
        public Comment Comment { get; set; }

    }

    public class Comment
    {
        public List<CommentList> Date { get; set; }
        public Pagination Pagination { get; set; }
    }
}
